<table cellpadding='0' cellspacing='0' class='${cssClass!"titleTb"}'>
    <tr>
        <td>总计 ${parameters.totalRecord} 条
            共 <#if parameters.totalPage == 0>1<#else>${parameters.totalPage}</#if> 页
            当前第[<font color='red'>${parameters.curPage + 1}</font>] 页
            <#if parameters.curPage == 0>
                首页
            <#else>
                <a href='javascript:firstPage()'>首页</a>
            </#if>

            <#if parameters.curPage == 1>
                <a href='javascript:prePage()'>上一页</a>
            <#else>
                上一页
            </#if>

            <#if parameters.curPage < parameters.totalPage>
                <a href='javascript:nextPage()'>下一页</a>
            <#else>
                下一页
            </#if>

            <#if parameters.curPage == parameters.totalPage >
                尾页
            <#else>
                <a href='javascript:lastPage()'>尾页</a>
            </#if>

            跳转到 <input name="input_pagedList_goPage"
            id='input_pagedList_goPage' type='text' value='${parameters.curPage + 1}' size='4'
            title='输入1到<#if parameters.totalPage == 0>1<#else>${parameters.totalPage}</#if>的数字'
            maxlength='4' onKeyDown='javascript:pagedList_goToPage(this,event);' /> 页
            <a href=""> GO</a>
        </td>
    </tr>
</table>

<script defer>
    var _reqParam = "${parameters}";
    pageIndex = ${parameters.curPage};
    if($('input_pagedList_goPage')){
        $('input_pagedList_goPage').onkeypress = function(e){
            var chr;
            if(e)
                chr=e.charCode;
            else
                chr=window.event.keyCode;
            if(chr==0)
                return true;
            else
                return /\d/.test(String.fromCharCode(chr))||(this.value.indexOf('+')<0?String.fromCharCode(chr)=='+':false);
    };

    $('input_pagedList_goPage').onpaste     = function(e){if(e==null)return !clipboardData.getData('text').match(/\d/); else return false;};
    $('input_pagedList_goPage').ondragenter = function(e){return false;};
    $('input_pagedList_goPage').style.imeMode= 'disabled';}
    goPage = function(index){
        var _sortParam;
        if (sortName) {
            _sortParam = "sortName=" + sortName + "&sortType=" + sortType + "&colIndex=" + colIndex;
        } else {
            _sortParam = "";
        }

        if(index<0)index=0;
        var _index=${parameters.totalPage - 1};
        index = index > _index ? _index : index;
        var _pageUrl='${parameters.url}?page.curPage='+index+'&'+new Date() + '&' + _sortParam;

        try{
            if(typeof(pageHandler) != 'undefined'){
            pageHandler(_pageUrl + '&' + _reqParam);
          }else{
            window.location.href=_pageUrl + '&' + _reqParam;
          }
        }catch(e){
        }
  };

    pagedList_goToPage = function(obj,event){
        if(event.keyCode==13) {goPage(obj.value-1);}
    };
    firstPage = function(){ goPage(0); };
    lastPage = function(){ goPage(${parameters.totalPage -1}); };
    prePage = function(){ goPage(${parameters.curPage - 1}); };
    nextPage = function(){ goPage(${parameters.curPage + 1}); };
</script>
